package com.school.demo.util;

//import com.google.gson.Gson;
//import com.google.gson.GsonBuilder;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

import java.util.Map;

/**
 * @program: demo
 * @description: gson工具类, 和swigger冲突了
 * @author: Charlotte
 * @create: 2021-03-01 10:36
 **/
public class GsonUtil {
    public static Map<String, Object> toJson(String json) throws JsonProcessingException {
        ObjectMapper mapper = new ObjectMapper();
        Map readValue = mapper.readValue(json, Map.class);
        System.out.println(readValue);
        return readValue;
    }
}
